package com.wen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wen.pojo.PurchaseOrder;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wen.pojo.Supplier;
import com.wen.pojo.dto.SupplierDto;
import com.wen.pojo.dto.wen.SupplierANDProductDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SupplierMapper extends BaseMapper<Supplier> {

//    @Select("SELECT * FROM consumer a,supplier b WHERE a.consumer_id = b.consumer_id AND a.status='s001-1' AND b.status='c001-1'")
//    List<SupplierDto> sel();

    //根据供应商的ID查询出对应月份的收入
    List<PurchaseOrder> getSupplierYearMonthsSumTotal(Integer id);
    List<SupplierANDProductDto> sel(@Param("name") String name,@Param("id") String id);

}
